<template>
	<view>
		<view v-for="(item ,index) in dataInfo" :key="index">
			<uni-list-chat clickable @click="onLink('/pages/resume/resume',item)" :avatar-circle="true" :title="item.resumes.name" :avatar="item.resumes.head_img" :note="'性别：'+item.resumes.sex+'；手机号码：'+item.resumes.mobilephone" :time="item.brief" ></uni-list-chat>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				dataInfo:[],
			}
		},
		onLoad(options){
			this.id = options.id
			this.onGetData()
		},
		methods: {
			onGetData(){
				let _this = this
				this.$request_api('applet_api/recruit/resume','POST',{id:this.id}).then(res => {
					_this.dataInfo = res.data
					_this.dataInfo.forEach((e) => {
						e.sex = e.sex == 1 ? '男' : '女'
					})
					
				}).catch(err => {
					console.log(err)
				})
			},
			onLink(url,item){
				uni.navigateTo({
					url: url+"?user_id="+item.uid+"&resume_id="+item.resume_id
				});
			}
		}
	}
</script>

<style>

</style>
